package cn.xiaoniu.day01.testJson;

import com.alibaba.fastjson.JSON;

import cn.xiaoniu.day01.bean.RatingBean;

public class TestJson {
	public static void main(String[] args) {
		String json = "{\"movie\":\"1193\",\"rate\":\"5\",\"timeStamp\":\"978300760\",\"uid\":\"1\"}";
		RatingBean ratingBean = JSON.parseObject(json, RatingBean.class);
		System.out.println(ratingBean);
		Object object = JSON.toJSON(ratingBean);
		String string = object.toString();
		System.out.println(string);
		
	}

}
